package com.ljx.funchat.user.domain.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;

@AllArgsConstructor
@Getter
public enum UserApplyStatusEnum {

    WAIT(1, "待审批"),
    AGREE(2, "同意"),
    DISAGREE(3, "拒绝");

    private Integer status;
    private String desc;

    private static Map<Integer, UserApplyStatusEnum> cache;

    static {
        cache = Arrays.stream(UserApplyStatusEnum.values()).collect(Collectors.toMap(UserApplyStatusEnum::getStatus, Function.identity()));
    }

}
